home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 426-450 / disk_441 / dme / src / rexx / rexxio.h < prev    next >
C/C++ Source or Header  |  1992-05-06  |  3KB  |  76 lines

  1. /* === rexx/rexxio.h ====================================================
  2.  *
  3.  * Copyright (c) 1986, 1987 by William S. Hawes (All Rights Reserved)
  4.  *
  5.  * ======================================================================
  6.  * Header file for ARexx Input/Output related structures
  7.  */
  8.  
  9. #ifndef REXX_REXXIO_H
  10. #define REXX_REXXIO_H
  11.  
  12. #ifndef REXX_STORAGE_H
  13. #include "rexx/storage.h"
  14. #endif
  15.  
  16. #define RXBUFFSZ  204                  /* buffer length                 */
  17.  
  18. /* The IoBuff is a resource node used to maintain the File List.  Nodes are
  19.  * allocated and linked into the list whenever a file is opened.
  20.  */
  21.  
  22. struct IoBuff {
  23.    struct RexxRsrc iobNode;            /* structure for files/strings   */
  24.    APTR     iobRpt;                    /* read/write pointer            */
  25.    LONG     iobRct;                    /* character count               */
  26.    LONG     iobDFH;                    /* DOS filehandle                */
  27.    APTR     iobLock;                   /* DOS lock                      */
  28.    LONG     iobBct;                    /* buffer length                 */
  29.    BYTE     iobArea[RXBUFFSZ];         /* buffer area                   */
  30.    };                                  /* size: 256 bytes               */
  31.  
  32. /* Access mode definitions                                              */
  33. #define RXIO_EXIST   -1                /* an external filehandle        */
  34. #define RXIO_STRF    0                 /* a "string file"               */
  35. #define RXIO_READ    1                 /* read-only access              */
  36. #define RXIO_WRITE   2                 /* write mode                    */
  37. #define RXIO_APPEND  3                 /* append mode (existing file)   */
  38.  
  39. /* Offset anchors for SeekF()                                           */
  40. #define RXIO_BEGIN   -1                /* relative to start             */
  41. #define RXIO_CURR    0                 /* relative to current position  */
  42. #define RXIO_END     1                 /* relative to end               */
  43.  
  44. /* The Library List contains just plain resource nodes.                 */
  45.  
  46. #define LLOFFSET(rrp) (rrp->rr_Arg1)   /* "Query" offset                */
  47. #define LLVERS(rrp)   (rrp->rr_Arg2)   /* library version               */
  48.  
  49. /* The RexxClipNode structure is used to maintain the Clip List.  The
  50.  * value string is stored as an argstring in the rr_Arg1 field.
  51.  */
  52.  
  53. #define CLVALUE(rrp) ((STRPTR) rrp->rr_Arg1)
  54.  
  55. /* A message port structure, maintained as a resource node.
  56.  * The ReplyList holds packets that have been received but haven't been
  57.  * replied.
  58.  */
  59.  
  60. struct RexxMsgPort {
  61.    struct RexxRsrc rmp_Node;           /* linkage node                  */
  62.    struct MsgPort  rmp_Port;           /* the message port              */
  63.    struct List     rmp_ReplyList;      /* messages awaiting reply       */
  64.    };
  65.  
  66. /* DOS Device types                                                     */
  67. #define DT_DEV    0                    /* a device                      */
  68. #define DT_DIR    1                    /* an ASSIGNed directory         */
  69. #define DT_VOL    2                    /* a volume                      */
  70.  
  71. /* Private DOS packet types                                             */
  72. #define ACTION_STACK 2002              /* stack a line                  */
  73. #define ACTION_QUEUE 2003              /* queue a line                  */
  74.  
  75. #endif
  76.